package com.itheima.Test;

public class Student {
    //私有构造方法;
    /*private Student(){};
    //2.在类内部自己创建一个唯一的对象
    private static final Student s = new Student();
    //3.提供公共的方法把对象传递给外界
    public static Student getInstance(){
        return s;
    }*/
    private Student(){};
    private static Student s = new Student();
    public static Student getInstance(){
        return s;
    }

}
